@echo off
set user=zhangyu
set host=123.60.114.150
set port=2222
set srcDir=/mnt/data/zhangyu/Program/rk3568/rk3568/out/rk3568/tests/unittest/ace_engine/components
set dstDir=.\

@REM pull the dynamic library from the server
set ftpFile=sftp.txt
>%ftpFile% (
    echo get %srcDir%/navigation_test_ng %dstDir%
    echo get %srcDir%/navigator_event_hub_test_ng %dstDir%
    echo get %srcDir%/navrouter_test_ng %dstDir%
    echo bye
)
sftp -b %ftpFile% -oPort=%port% %user%@%host%
del %ftpFile%

@REM push the dynamic library to the rk3568
hdc shell mount -o rw,remount /

hdc file send ./navigation_test_ng /data
hdc file send ./navigator_event_hub_test_ng /data
hdc file send ./navrouter_test_ng /data

hdc shell chmod +x /data/navigation_test_ng
hdc shell chmod +x /data/navigator_event_hub_test_ng
hdc shell chmod +x /data/navrouter_test_ng

hdc shell /data/navigation_test_ng
hdc shell /data/navigator_event_hub_test_ng
hdc shell /data/navrouter_test_ng